#pragma once

#include "D3DApp.h"
#include "Vertex.h"
#include "Triangle.h"
#include "Cube.h"
#include "TriGrid.h"
#include "Enemies.h"
//#include "Math.h"
#include "Sprite.h"
#define ENEMY_NUMBER 100
//#define GRID_HEIGHT 19
//Main class of my game
class Tp2 : public D3DApp
{
public:
	Tp2();
	Tp2(HINSTANCE hInstance, std::string winCaption);
	~Tp2();
	//public functions
	void OnLostDevice();
	void OnResetDevice();
	void Update(double dt);
	void Draw(ID3DXSprite& sprite, D3DXMATRIX& view, D3DXMATRIX& proj);
	void GenerateLevel();
	void OnCollision();
	bool ResetLife(double dt);
	void Unvulnerability();
	void GameOver();
	//private variables
private:
	std::vector<Enemies*> maxEnemieList;
	Triangle* trilatere;
	Cube* hexalactere;
	TriGrid* grid;
	bool m_Collision;
	int m_Life = 5;
	float m_Time = 3.0f;
	bool m_Timer;
	
};

